package com.orangelife.redis.core.redis.session.redisSession;

import com.orangelife.redis.core.redis.RedisClient;

public class RedisSessionFactory {

	public static WebServiceSession getRedisSession(String id) {
		if (id == null) {

			return null;
		}

		if (RedisClient.redisFactory().isExits(id)) {

			return new WebServiceSession(id, RedisClient.redisFactory());
		} else {

			return null;
		}

	}

	public static WebServiceSession createRedisSession(String id) {

		return new WebServiceSession(id, RedisClient.redisFactory(), null);

	}

}
